1
general::
Also, if the cap fits, wear it. If something applies to you, accept it, as in These problems are hard to solve, and most people would need help, so if the shoe fits, wear it! This expression originated as if the cap fits, which alluded to a fool's cap and dates from the early 1700s. Although this version has not died out entirely, shoe today is more common and probably gained currency through the Cinderella fairy tale, in which the prince sought her out by means of the slipper she lost at the ball.
American Heritage Idioms